N = 1 (slider from 1 to 15, step 1)
S1 = Sum(((1 / ((π * n^(2))) * ((-1)^(n) - 1)) * cos((n * x))), n, 1, N)
C = (3.141592653589793, 3.141592653589793)
F = (-3.141592653589793, 3.141592653589793)
G = (-6.283185307179586, 0)
h = Segment(F, G)
H: (π, 0)
I: ((2 * π), 0)
i = Segment(H, I)
A: ((-π), 0)
B: (0, 0)
f = Segment(A, B)
g = Segment(B, C)
S2 = Sum(((-1)^(n + 1) / n * sin((n * x))), n, 1, N)
p(x) = If[-6.28319 < x < 6.28319, π / 4 + S1(x) + S2(x)]